package model

import (
	"time"

	"gorm.io/gorm"
)

type BaseModel struct {
	ID        int32     `gorm:"primarykey"`
	CreatedAt time.Time `gorm:"column:add_time"`
	UpdatedAt time.Time `gorm:"column:update_time"`
	DeletedAt gorm.DeletedAt
	IsDeleted bool
}

// 商品表
type Goods struct {
	BaseModel
	GoodName         string
	GoodPrice        float32
	Status           int    //上下架状态
	Stock            int    //库存
	Desc             string //描述
	ClassificationId int    //分类ID
	BrandId          int    //品牌ID
}

// 图库表
type PicFiles struct {
	BaseModel
	Image  string
	GoodId int
}

// 分类表
type Classification struct {
	BaseModel
	Name string //分类名称
}

// 品牌表
type Brands struct {
	BaseModel
	Name string //品牌名称
}
